package com.huawei.appgallery.search.ui.node;

import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.view.ViewGroup.LayoutParams;
import android.widget.LinearLayout;
import com.huawei.appgallery.search.ui.card.HistorySearchCard;
import o.cdr;
import o.chy;
import o.cih;
import o.cuv.e;

public class HistorySearchNode extends cdr {
    public HistorySearchNode(Context context) {
        super(context, 1);
    }

    public int ˏ() {
        return 1;
    }

    public boolean ˊ(ViewGroup viewGroup, ViewGroup viewGroup2) {
        LayoutParams layoutParams = new LinearLayout.LayoutParams(-1, -1);
        View inflate = LayoutInflater.from(this.ॱ).inflate(e.ॱˎ, null);
        cih historySearchCard = new HistorySearchCard(this.ॱ);
        historySearchCard.ˏ(inflate);
        ˊ(historySearchCard);
        viewGroup.addView(inflate, layoutParams);
        return true;
    }

    public void ˋ(chy o_chy) {
        super.ˋ(o_chy);
        for (int i = 0; i < ˊॱ(); i++) {
            HistorySearchCard historySearchCard = (HistorySearchCard) ˎ(i);
            if (historySearchCard != null) {
                historySearchCard.ˏ(o_chy);
            }
        }
    }
}
